# -*- coding: utf-8 -*-
# Copyright 2017-2019 ControlScan, Inc.
#
# This file is part of Cyphon Engine.
#
# Cyphon Engine is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, version 3 of the License.
#
# Cyphon Engine is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Cyphon Engine. If not, see <http://www.gnu.org/licenses/>.
#
# Generated by Django 1.10.1 on 2017-03-20 16:23
from __future__ import unicode_literals

from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('datasieves', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='Inspection',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=255, unique=True)),
            ],
        ),
        migrations.CreateModel(
            name='InspectionStep',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('result_value', models.CharField(help_text='The value to be returned if the DataSieve returns True for the data examined.', max_length=255)),
                ('rank', models.IntegerField(default=0, help_text='An integer representing the order of this step in the Inspection. Steps are performed in ascending order, with the lowest number examined first.')),
                ('inspection', models.ForeignKey(help_text='The Inspection in which this step is included.', on_delete=django.db.models.deletion.CASCADE, related_name='steps', related_query_name='step', to='inspections.Inspection', verbose_name='Inspection')),
                ('sieve', models.ForeignKey(help_text='The DataSieve used to inspect the data during this step.', on_delete=django.db.models.deletion.CASCADE, related_name='inspection_steps', related_query_name='inspection_step', to='datasieves.DataSieve')),
            ],
            options={
                'ordering': ['rank'],
            },
        ),
        migrations.AlterUniqueTogether(
            name='inspectionstep',
            unique_together=set([('inspection', 'sieve'), ('inspection', 'rank')]),
        ),
    ]
